#ifndef XLCOREACTIONMANAGER_H
#define XLCOREACTIONMANAGER_H
#include "coretypes.h"
#include <QAction>
#include <QList>
#include <QObject>

namespace xl {

class XLCORESHARED_EXPORT ActionManager : public QObject
{
    Q_OBJECT

public:
    explicit ActionManager(QObject* parent = nullptr);
    ~ActionManager();

    const QList<QAction*>& actions() { return actions_; }
    QAction* action(const QString& name) const;
    void addAction(QAction* action);

private:
    Q_DISABLE_COPY_MOVE(ActionManager)

    QList<QAction*> actions_;
};
} // namespace xl

#endif // XLCOREACTIONMANAGER_H
